package com.vc.aha_server_event.controller;

import com.vc.aha_server_event.annotation.RequestLimit;
import com.vc.aha_server_event.dto.TravelThroughPageDTO;
import com.vc.aha_server_event.service.PageTrackingService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ShaoZhenbang
 * @description
 * @date 2022/3/31
 */
@RestController
@RequestMapping("/travelThroughPage")
public class PageTrackingController {
    @Resource
    private PageTrackingService pageTrackingService;

    @RequestLimit
    @PostMapping()
    public void storeData(@RequestBody TravelThroughPageDTO travelThroughPageDTO) {
        pageTrackingService.savePageTrackInfo(travelThroughPageDTO);
    }
}
